import { defineStore } from 'pinia'
import { channelOptions, subjectOptions } from '../utils/sysUtils'

export const useCustomerStore = defineStore('customer', {
  state: () => ({
    channels: [...channelOptions],
    subjects: [...subjectOptions]
  }),
  
  getters: {
    getChannels: (state) => state.channels,
    getSubjects: (state) => state.subjects
  },
  
  actions: {
    // 如果需要从API获取数据，可以在这里添加方法
    async fetchChannels() {
      // 预留从API获取渠道来源的接口
      // const response = await api.getChannels()
      // this.channels = response.data
    },
    
    async fetchSubjects() {
      // 预留从API获取意向学科的接口
      // const response = await api.getSubjects()
      // this.subjects = response.data
    }
  }
})